package com.heima.apis.user;

import com.heima.model.common.dtos.PageResponseResult;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.dtos.AuthDto;
import com.heima.model.user.pojo.ApUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("leadnews-user")
public interface IUserClient {

    /**
     * 按照状态分页查询用户列表
     * @param dto
     * @return
     */
    @PostMapping("/api/v1/user/feign/load_user_realname_list")
    public PageResponseResult loadListByStatus(@RequestBody AuthDto dto);

    /**
     *
     * @param dto
     * @return
     */
    @PostMapping("/api/v1/user/feign/update_status")
    public ResponseResult updateStatus(@RequestBody AuthDto dto);

    @GetMapping("/api/v1/user/{id}")
    ApUser findUserById(@PathVariable("id") Integer id);
}
